package spring.j2024_11_17_3.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import spring.j2024_11_17_3.config.UserConfig;
import spring.j2024_11_17_3.dao.UserDao;

import javax.annotation.Resource;


@Service
public class UserService {
//      1. 属性注入
//       @Autowired
//    private UserDao userDao ;
  @Resource(name = "u1")
    private UserDao userDao ;

    public void say(){
        System.out.println("userService ....");
        this.userDao.say();
    }
}
